package com.abo.yaas.view.widgets.validators;

import com.vaadin.data.validator.RegexpValidator;

@SuppressWarnings("serial")
public class EmailValidator extends RegexpValidator {
    private static final String regex = "^([a-zA-Z0-9_\\-\\.]+)@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.)|(([a-zA-Z0-9\\-]+\\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\\]?)$";

    public EmailValidator(String errorMessage) {
        super(regex, errorMessage);
    }
}
